import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/homePage',
    },
    {
      path: '/homePage',
      name: 'homePage',
      component: () => import('../views/homePage/index.vue'),
    },
    {
      path: '/searchPage',
      name: 'searchPage',
      component: () => import('../views/searchPage/index.vue'),
    },
    {
      path: '/goodsDetailPage',
      name: 'goodsDetailPage',
      component: () => import('../views/goodsDetailPage/index.vue'),
    },
    {
      path: '/merchantDetailPage',
      name: 'merchantDetailPage',
      component: () => import('../views/merchantDetailPage/index.vue'),
    },
    {
      path: '/commentPage',
      name: 'commentPage',
      component: () => import('../views/commentPage/index.vue'),
    },
    {
      path: '/loginTypePage',
      name: 'loginTypePage',
      component: () => import('../views/loginTypePage/index.vue'),
    },
    {
      path: '/loginPage',
      name: 'loginPage',
      component: () => import('../views/loginPage/index.vue'),
    },
  ],
})

export default router
